<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Hello World</title>
    <script src="../vue.js"></script>
  </head>
  <body>
    <div id="root">
      <counter :number="faNumber"></counter> <counter :number="faNumber"></counter>
    </div>
    <script>
      Vue.component('counter', {
        props: ['number'],
        data() {
          return {
            count: this.number
          }
        },
        template: '<div @click="handleClick">{{count}}</div>',
        methods: {
          handleClick() {
            this.count++
          }
        }
      })

      var vm = new Vue({
        el: '#root',
        data: {
          faNumber:1
        },
        methods: {
          handleChange() {}
        }
      })
    </script>
  </body>
</html>
